/**
 * 
 */
package cn.pfcg.rally.persistent.po;

import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * @author cxq
 *
 */
public class SubjectType {
	private int id;
	private String name;
	private String typeDescribe;

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return new ToStringBuilder(this).append("id", id).append("name", name)
				.append("typeDescribe", typeDescribe).toString();
	}
	/**
	 * @return the typeDescribe
	 */
	public String getTypeDescribe() {
		return typeDescribe;
	}
	/**
	 * @param typeDescribe the typeDescribe to set
	 */
	public void setTypeDescribe(String typeDescribe) {
		this.typeDescribe = typeDescribe;
	}
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + id;
		result = PRIME * result + ((name == null) ? 0 : name.hashCode());
		result = PRIME * result + ((typeDescribe == null) ? 0 : typeDescribe.hashCode());
		return result;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final SubjectType other = (SubjectType) obj;
		if (id != other.id)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (typeDescribe == null) {
			if (other.typeDescribe != null)
				return false;
		} else if (!typeDescribe.equals(other.typeDescribe))
			return false;
		return true;
	}

	/**
	 * @param name
	 * @param typeDescribe
	 */
	public SubjectType(String name, String typeDescribe) {
		super();
		this.name = name;
		this.typeDescribe = typeDescribe;
	}
	/**
	 * 
	 */
	public SubjectType() {
		super();
	}
	
}
